import request from "../utils/request";
import requestMock from "../utils/requestmock";

export const reqGetCategoryList = () => {
  return request({
    method: "GET",
    url: "/product/getBaseCategoryList",
  });
};
export const requestMockFloors = () => {
  return requestMock({
    method: "GET",
    url: "/floors",
  });
};
export const requestImages = () => {
  return requestMock({
    method: "GET",
    url: "/banners",
  });
};

export const requestGoodsList = (data) => {
  return request({
    method: "POST",
    url: "/list",
    data,
  });
};

/* export const requestGoodsList = ({
  category1Id, //一级分类
  category2Id, //二级分类
  category3Id, //三级分类
  categoryName, //分类名称
  keyword, //关键字
  props, //尚品属性
  trademark, //品牌: "ID:品牌名称"
  order, //排序方式
  pageNo, //页码
  pageSize, //每页数量
}) => {
  return request({
    method: "POST",
    url: "/list",
    data: {
      category1Id, //一级分类
      category2Id, //二级分类
      category3Id, //三级分类
      categoryName, //分类名称
      keyword, //关键字
      props, //尚品属性
      trademark, //品牌: "ID:品牌名称"
      order, //排序方式
      pageNo, //页码
      pageSize, //每页数量
    },
  });
}; */

//商品详情页
export const detailGood = (id) => {
  return request({
    method: "GET",
    url: `/item/${id}`,
  });
};
